package com.hsc.www.plugin.dataPermission;

import com.hsc.www.plugin.PageHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PermissionRule {
    private Logger log = LoggerFactory.getLogger(PageHelper.class);

    /**
     * 角色
     */
    private String  role;

    /**
     * 主表名
     */
    private String tableName;
    /**
     * codeDesc<br>
     * 过滤表达式字段, <br>
     * <code>{uid}</code>会自动替换为当前用户的userId<br>
     * <code>{me}</code> main entity 主实体名称
     * <code>{me.a}</code> main entity alias 主实体别名
     * 格式如：
     * <ul>
     * <li>userId = {uid}</li>
     * <li>(userId = {uid} AND authType > 3)</li>
     * <li>((userId = {uid} AND authType) > 3 OR (dept in (select dept from depts where manager.id = {uid})))</li>
     * </ul>
     */
    private String exps;

    /**
     * 备注
     */
    private String remark;

    public Logger getLog() {
        return log;
    }

    public void setLog(Logger log) {
        this.log = log;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getExps() {
        return exps;
    }

    public void setExps(String exps) {
        this.exps = exps;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
